#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'pxYe'

class Student(object):

    """私有的初始化方法"""
    def __init(self):
        self._name = None # 定义私有变量
        self._score = None # 定义私有变量
        self._gread = None # 定义私有变量

    """getName"""
    def get_name(self):
        return self._name

    """setName"""
    def set_name(self, name):
        self._name = name

    """getScore"""
    def get_score(self):
        return self._score

    """setCore"""
    def set_score(self, score):
        self._score = score

        if self._score >= 90:
            self._gread = 'A'
        elif self._score >= 60:
            self._gread = 'B'
        else:
            self._gread =  'C'

    def print_score(self):
        print('%s: %s ---> %s' % (self._name,self._score, self._gread))

# bart = Student('Bart Simpson', 59)
# lisa = Student('Lisa Simpson', 87)
# bart.print_score()
# lisa.print_score()